package com.cjx.yuanshenstartforumbackend.common;

/**
 * @Description 错误码
 * @Author cjx
 * @Date 2023/12/14 16:45
 **/
public enum ErrorCode {

    /**
     * 成功
     */
    SUCCESS(2000, "ok", ""),
    /**
     * 请求参数错误
     */
    PARAMS_ERROR(4000, "请求参数错误", ""),
    /**
     *请求数据为空
     */
    NULL_ERROR(4001, "请求数据为空", ""),
    /**
     *未登录
     */
    NOT_LOGIN(4010, "未登录", ""),
    /**
     *无权限
     */
    NO_AUTH(4011, "无权限", ""),
     /**
     *系统内部异常
     */
    SYSTEM_ERROR(5000, "系统内部异常", ""),
    /**
     * 密码错误
     */
    WRONG_PASSWORD_OR_USERNAMES(4012,"账号或密码错误",""),
    /**
     * 两次密码不一致
     */
    THE_PASSWORD_IS_INCONSISTENT_TWICE(4014,"两次密码不一致",""),
    /**
     * 用户名重复
     */
    DUPLICATE_USERNAMES(4013, "用户名重复", "");

    private  int code;
    private  String message;
    private  String description;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDescription() {
        return description;
    }

    ErrorCode() {
    }



    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }
}
